package com.yh.action;

import com.yh.entity.User;
import com.yh.services.IUserService;
import com.yh.services.impl.UserServiceImpl;
import com.yh.util.BaseAction;
import lombok.Data;

import java.util.List;

import static com.opensymphony.xwork2.Action.SUCCESS;

@Data
public class UpdateFAction extends BaseAction {
    private String id;

    public String execute(){
        IUserService iUserService=new UserServiceImpl();
        User user=new User();
        user.setCol_Id(Integer.parseInt(id));
        User users=iUserService.getUserByIud(user);
        System.out.println(users.getCol_Name());
        if (users!=null){
            getSession().setAttribute("t",users);
            return SUCCESS;
        }else {
            return "out";
        }
    }
}
